﻿using System.Text.RegularExpressions;

namespace Xpus.YouYTube.Utility
{
	/// <summary>
	/// 正则表达式工具。对应着~/App_Data/Regexes.xml配置。
	/// </summary>
	public class TRegexUtility
	{
		public static readonly Regex Url = new Regex(
			@"^(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?$");

		public static readonly Regex IP = new Regex(
			@"^([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$");

	}
}
